package top.putileaf.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import top.putileaf.mapper.CommentMapper;
import top.putileaf.pojo.Comment;
import top.putileaf.service.CommentService;

import java.util.List;

@Service
public class CommentServiceImpl implements CommentService {
    @Autowired
    private CommentMapper commentMapper;
    @Override
    public void add(Comment content) {
        commentMapper.add(content);
    }

    //获取评论列表
    @Override
    public List<Comment> list(Integer articleId) {
        return commentMapper.list(articleId);

    }
}
